import request from '@/utils/request'

const api_name = '/mes/mine'

export default {

  // 列表数据查询
  findPage(pageNo, pageSize) {

    // 调用后端接口 使用 axjos 异步请求
    return request({
      url: `${api_name}/${pageNo}/${pageSize}`,
      method: 'post'
    })
  },
  view(id) {
    return request({
      url: `${api_name}/${id}`,
      method: 'get'
    })
  },
  delete(id) {
    return request({
      url: `${api_name}/${id}`,
      method: 'delete'
    })
  },
  add(mine) {
    return request({
      url: `${api_name}/saveMine`,
      method: 'post',
      data: mine
    })
  },
  update(mine) {
    return request({
      url: `${api_name}/updateMine`,
      method: 'put',
      data: mine
    })
  }
}
